"""backend URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from mini_pra_api import views as mini_api
from mini_pra_api.views import UserRegisterView, CaptchaView, get_captcha, update_user_info

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', mini_api.login),
    path('getuserinfo/', mini_api.getuserinfo),
    path('getvediotype/', mini_api.getvediotype),
    path('getrandomvideos/', mini_api.get_random_videos),
    path('getvedio/', mini_api.getvedio),
    path('likevideo/', mini_api.like_video),
    path('unlikevideo/', mini_api.unlike_video),
    path('liked_videos/', mini_api.liked_videos, name='liked_videos'),
    path('collect/', mini_api.collect_video, name='collect_video'),
    path('uncollect/', mini_api.uncollect_video, name='uncollect_video'),
    path('collected_videos/', mini_api.collected_videos, name='collected_videos'),
    path('register/', UserRegisterView.as_view(), name='user-register'),
    path('captcha/', include('captcha.urls')),
    path('verify-captcha/', CaptchaView.as_view(), name='verify-captcha'),
    path('get-captcha/', get_captcha, name='get-captcha'),
    path('update_user_info/', update_user_info, name='update_user_info'),

]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)